package messageTreater;

import com.mongodb.MongoClient;
import com.mongodb.client.MongoDatabase;

/**
 * deal with event
 * @author Administrator
 *
 */
public class EventMachine {
	public void connectDB() {
		try {
			// 连接到 mongodb 服务
			MongoClient mongoClient = new MongoClient("103.230.121.72", 27017);

			// 连接到数据库
			MongoDatabase mongoDatabase = mongoClient.getDatabase("mycol");
			System.out.println("Connect to database successfully");

		} catch (Exception e) {
			System.err.println(e.getClass().getName() + ": " + e.getMessage());
		}
	}
	
	public String getNewEvent(String uName) {
		return "";
	}
}
